<?php

declare(strict_types=1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Topic extends Model
{
  //

  public function getTitleImgSrcAttr()
  {
    return get_source_link($this->getAttr('title_img'));
  }

  public function getReadUrlAttr()
  {
    return url('Post/index',['topic'=>$this->getAttr('title')]);
  }
}
